/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model.creature.plant.plugin;

import java.awt.Image;
import model.creature.plant.MultiHarvestPlant;
import model.game.GameInterface;
import model.map.cell.PlantableCell;
import model.utility.ImageUtility;

/**
 * Trees that when harvested produce hard money
 */
public class MoneyTree extends MultiHarvestPlant {

  public MoneyTree(GameInterface game, PlantableCell cell) {
    super(game, cell);
  }

  @Override
  protected String getFruitName() {
    return "Unliquidified Cheque";
  }

  @Override
  protected int timeToMature() {
    return 2;
  }

  @Override
  protected int timeToDie() {
    return 5;
  }

  @Override
  protected int timeToHarvest(int harvest_count) {
    return 2;
  }

  @Override
  protected int getHPAtCurrentLevel() {
    return 1;
  }

  @Override
  public boolean canUpgrade() {
    return false;
  }

  @Override
  public int getUpgradeCost() {
    return 0;
  }

  @Override
  public Image getImage() {
    if (is_seed_) {
      return ImageUtility.loadImage("resources/pictures/plants/moneytree/seed.png");
    } else if (isHarvestable()) {
      return ImageUtility.loadImage("resources/pictures/plants/moneytree/harvestable.png");
    } else {
      return ImageUtility.loadImage("resources/pictures/plants/moneytree/mature.png");
    }
  }

  @Override
  public String getName() {
    return "Money Tree";
  }

  @Override
  public String getSeason() {
    return game_.getGameTime().getCurrentSeason().getName();
  }

  @Override
  public String getDescription() {
    return "Tree that produces unliquidifed cheques to be sold. Grows in 2 days,"
            + "harvestable in 2 days. Dies in 5 days. Very fragile to attacks."
            + " Can grow in any season.";
  }

}
